package org.wit.ecommerce.service;

import java.util.Map;

import org.wit.ecommerce.domain.Product;
import org.wit.ecommerce.dto.Navigator;
/**
 * 
 * @author Justin
 *
 */
public interface IProductService {
	/**
	 * get a product by id
	 * @param id
	 * @return
	 */
	Product getProductById(Long id);
	
	/**
	 * add a product to the system
	 * @param product
	 * @return
	 */
	void createProduct(Product product);
	
	/**
	 * update a product, usually the status of a product
	 * @param product
	 * @return
	 */
	void updateProduct(Product product);
	
	/**
	 * delete a product
	 * @param product
	 */
	void deleteProduct(Product product);
	
	/**
	 * get products by page and criteria
	 * @param page
	 * @param keywords
	 * @return
	 */
	Navigator<Product> getProductsByPage(int page, Map<String, ?> keywords);

	/**
	 * delete product by id
	 * @param id
	 */
	void deleteProduct(Long id);
}
